<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr = [1,2,3,4,5];
    //2,4,6,8,10
//    var arr2 = arr.map(function(v){
//        return v;
//    })


    Array.prototype.myMap = function(callback){
        var arr = this.valueOf();
        var newArr = [];
        for(var i = 0;i<arr.length;i++){
            newArr.push(callback(arr[i],i,arr));
        }
        return newArr;
    };
var fun2 = function(v){
    return v+200;
};
    var arr2 = arr.myMap(fun2);
    console.log(arr2);
</script>
</body>
</html>